import type {ResponseData} from "../../common/type";

export interface DictListResponseData extends ResponseData {
    result: {
        data: DictList,
        page: number,
        items: number,
        pageSize: number,
        currentPage: number,
        pageCount: number
    }
}

//定义字典列表 类型
export interface DictList {
    dictList: DictInfo[]
}

//定义字典 类型
export interface DictInfo {
    //id
    id: number,
    //uuid
    uuid: string,
    //数据编码
    dictCode: string,
    //父编码
    dictParentCode: string,
    //字典名称
    dictName: string,
    //字典值
    dictValue: string,
    //0未启用,1正常
    dictStatus: string,
    //排序
    sortNo: number,
    //是否是顶级
    top: string,
    //创建时间
    createTime: string,
    //修改时间
    updateTime: string,
}

//定义字典 添加/编辑类型
export interface DictAddOrUpdateForm {
    uuid?: string,
    //数据编码
    dictCode: string,
    //父编码
    dictParentCode: string,
    //字典名称
    dictName: string,
    //字典值
    dictValue: string,
    //排序
    sortNo: number,
}

//定义 返回 字典详情 类型
export interface DictInfoResponseData extends ResponseData {
    result: {
        //id
        id: number,
        //uuid
        uuid: string,
        //数据编码
        dictCode: string,
        //父编码
        dictParentCode: string,
        //字典名称
        dictName: string,
        //字典值
        dictValue: string,
        //0未启用,1正常
        dictStatus: string,
        //排序
        sortNo: number,
        //是否是顶级
        top: string,
        //创建时间
        createTime: string,
        //修改时间
        updateTime: string,
    }
}

